import { foo, bar } from './module.mjs';

console.log(foo, bar);

import fs from 'fs';

fs.writeFileSync('foo.txt', 'es module is working~');

import { writeFileSync } from 'fs';

writeFileSync('bar.txt', 'es module is working~');


import _ from 'lodash';

console.log(_.camelCase('Wu Bo')); // wuBo


// 不支持，因为第三方模块都是导出默认成员
import { camelCase } from 'lodash';
console.log(camelCase('Wu Bo')); // 报错